package com.apabi.dao;

import com.apabi.model.Downloads;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

/**
 * Created by atom on 18-1-12.
 */
public interface DownloadsDao extends JpaRepository<Downloads, Integer> {

    Page<Downloads> findByUserId(Integer id, Pageable pageable);

    void deleteByUserId(Integer id);

    void deleteByIdAndUserId(Integer id, Integer userId);
}
